﻿@model IEnumerable<orienta.Models.ORIMaeCompendio>

@{
    ViewBag.Title = "Index";
    String estiloTR="alt";
}
<link type="text/css" rel="stylesheet" href="@Url.Content("~/css/grilla.css")" />

<h2>Administración de Catalogos</h2>

<p>
    <a style="text-align:right" id="exportButton" class="button" title="Nuevo" href="../Compendio/Create" >
    <img src="images/nuevo.gif" alt="">Nuevo</img>
    </a>
</p>

<div id="widget_preview_temp_2" class="wfo_widget fc picked" onmousedown="pickWidget(this)" title="Click to edit. Drag to reorder." style="z-index: 500;">
<table cellspacing="0" class="choices ">
<thead>
    <tr>
        <th>
            Nombre 
        </th>
        <th>
            Fecha de Registro
        </th>
        <th>
            Inicio de vigencia
        </th>
        <th>
            Fin de Vigencia
        </th>
        <th>Elementos</th>
        <th>Editar</th>
        <th>Detalle</th>
        <th>Eliminar</th>
    </tr>
</thead>
<tbody>
@foreach (var item in Model) {
    if (estiloTR.Equals("alt"))
    {
        estiloTR = "";
    }
    else
    {
        estiloTR = "alt";
    }
    
    <tr class="@estiloTR">
        <td>
            @Html.DisplayFor(modelItem => item.vNomTabla)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dtFecReg)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dFecIniVig)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dFecFinVig)
        </td>
        <td>
            @Html.ActionLink("Elementos", "../CompendioElemento/List", new { id=item.nIdeCompendio }) 
        </td>
        <td>
            @Html.ActionLink("Editar", "Edit", new { id=item.nIdeCompendio }) 
        </td>
        <td>
            @Html.ActionLink("Detalle", "Details", new { id=item.nIdeCompendio }) 
        </td>
        <td>
            @Html.ActionLink("Eliminar", "Delete", new { id=item.nIdeCompendio })
        </td>
    </tr>
   
}
</tbody> 
</table>
<div>
